package com.openbravo.pos.payment;

import com.openbravo.basic.BasicException;
import com.openbravo.data.loader.DataRead;
import com.openbravo.data.loader.SerializableRead;
import com.openbravo.format.Formats;

public class PaymentInfoTicket extends PaymentInfo
  implements SerializableRead
{
  private static final long serialVersionUID = 8865238639097L;
  private double m_dTicket;
  private String m_sName;
  private String m_transactionID;

  public PaymentInfoTicket(double paramDouble, String paramString)
  {
    this.m_sName = paramString;
    this.m_dTicket = paramDouble;
  }

  public PaymentInfoTicket(double paramDouble, String paramString1, String paramString2)
  {
    this.m_sName = paramString1;
    this.m_dTicket = paramDouble;
    this.m_transactionID = paramString2;
  }

  public PaymentInfoTicket()
  {
    this.m_sName = null;
    this.m_dTicket = 0.0D;
    this.m_transactionID = null;
  }

  public void readValues(DataRead paramDataRead)
    throws BasicException
  {
    this.m_sName = paramDataRead.getString(1);
    this.m_dTicket = paramDataRead.getDouble(2).doubleValue();
    this.m_transactionID = paramDataRead.getString(3);
  }

  public PaymentInfo copyPayment()
  {
    return new PaymentInfoTicket(this.m_dTicket, this.m_sName);
  }

  public String getName()
  {
    return this.m_sName;
  }

  public double getTotal()
  {
    return this.m_dTicket;
  }

  public String getTransactionID()
  {
    return this.m_transactionID;
  }

  public String printPaid()
  {
    return Formats.CURRENCY.formatValue(new Double(this.m_dTicket));
  }

  public String printPaperTotal()
  {
    return Formats.CURRENCY.formatValue(new Double(-this.m_dTicket));
  }
}

/* Location:           D:\PowerFulPOS-2.30.2\openbravopos.jar
 * Qualified Name:     com.openbravo.pos.payment.PaymentInfoTicket
 * JD-Core Version:    0.6.0
 */